# cython: profile=True
import cython
from mpi4py cimport MPI
from v3dsolver.vector cimport Vec,Vec_new
from v3dsolver.fluid_elements.fluid_elems cimport Saffman
from v3dsolver.neighbour_finder cimport Bin
from numpy cimport ndarray
cimport cython

cdef extern from "math.h":
    double sqrt(double x)
    double pi
    double cos(double x)
    double sin(double x)

cdef class VRTSolver:
    cdef public Saffman base_elem
    cdef public list nbrs
    cdef public Bin bin
    cdef public int maxindex
    cdef public double cellsize
    cdef public double R
    cdef public double rnbr
    cdef public double h_nu
    cdef public int n
    cdef public MPI.Comm comm
    cdef public list possible_nbrs
    
    @cython.locals(possible_nbr=Vec,j=int,nbr=list,l=int,
                   dist_possible_nbrs=ndarray,
                   nbr_pos=Vec,rvec=Vec,r=double,new_index=int,
                   new_hash=str,str_new_index=str)
    cdef add_neighbour(VRTSolver self)
    
    cdef get_fractions(self,double* f,double* max_f,double* min_f,double* fsum)
    
